<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDeclarativeParserStatus Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDeclarativeParserStatus Class Reference<br /><sup><sup>[<a href="qtdeclarative.html">QtDeclarative</a> module]</sup></sup></h1><p>The QDeclarativeParserStatus class provides updates on the QML
parser state. <a href="#details">More...</a></p>

<p>Inherited by <a href="qdeclarativeitem.html">QDeclarativeItem</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdeclarativeparserstatus.html#QDeclarativeParserStatus">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeparserstatus.html#QDeclarativeParserStatus-2">__init__</a></b> (<i>self</i>, QDeclarativeParserStatus)</li><li><div class="fn" /><b><a href="qdeclarativeparserstatus.html#classBegin">classBegin</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdeclarativeparserstatus.html#componentComplete">componentComplete</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDeclarativeParserStatus class provides updates on the QML
parser state.</p>
<p>QDeclarativeParserStatus provides a mechanism for classes
instantiated by a <a href="qdeclarativeengine.html">QDeclarativeEngine</a> to receive
notification at key points in their creation.</p>
<p>This class is often used for optimization purposes, as it allows
you to defer an expensive operation until after all the properties
have been set on an object. For example, QML's <a href="qml-text.html">Text</a> element uses the parser status to defer
text layout until all of its properties have been set (we don't
want to layout when the <tt>text</tt> is assigned, and then
relayout when the <tt>font</tt> is assigned, and relayout again
when the <tt>width</tt> is assigned, and so on).</p>
<p>To use QDeclarativeParserStatus, you must inherit both a
<a href="qobject.html">QObject</a>-derived class and
QDeclarativeParserStatus, and use the <a href="qobject.html#Q_INTERFACES">Q_INTERFACES</a>() macro.</p>
<pre class="cpp">
 <span class="keyword">class</span> MyObject : <span class="keyword">public</span> <span class="type"><a href="qobject.html">QObject</a></span><span class="operator">,</span> <span class="keyword">public</span> <span class="type">QDeclarativeParserStatus</span>
 {
     Q_OBJECT
     Q_INTERFACES(<span class="type">QDeclarativeParserStatus</span>)

 <span class="keyword">public</span>:
     MyObject(<span class="type"><a href="qobject.html">QObject</a></span> <span class="operator">*</span>parent <span class="operator">=</span> <span class="number">0</span>);
     <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
     <span class="type">void</span> classBegin();
     <span class="type">void</span> componentComplete();
 }
</pre><hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDeclarativeParserStatus" />QDeclarativeParserStatus.__init__ (<i>self</i>)</h3><h3 class="fn"><a name="QDeclarativeParserStatus-2" />QDeclarativeParserStatus.__init__ (<i>self</i>, <a href="qdeclarativeparserstatus.html">QDeclarativeParserStatus</a>)</h3><h3 class="fn"><a name="classBegin" />QDeclarativeParserStatus.classBegin (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Invoked after class creation, but before any properties have
been set.</p>


<h3 class="fn"><a name="componentComplete" />QDeclarativeParserStatus.componentComplete (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Invoked after the root component that caused this instantiation
has completed construction. At this point all static values and
binding values have been assigned to the class.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>